/**
 * Created by Administrator on 2016/12/20.
 */

$(function(){
    init();
});
/****初始化表格数据*******/
function init(){
    console.log(localStorage.getItem("contractor"));
    $('#contractorTable').bootstrapTable({
        data:JSON.stringify(localStorage.getItem("contractor")),

    })
}
function responseHandler(res){
    //console.log(res);
    var needData = {
        rows: res.data.list,//只 输出data,内容不会显示 在页面内。必须 加上.list;
        total: res.data.total
    };
    return needData;
}
function indexFmt(val,row,index){
    var optionVar=$("table#pjTable").data('bootstrap.table').options;
    var pageNum=optionVar.pageNumber;
    var pageSize=optionVar.pageSize;
    return (pageNum-1)*pageSize+index+1;
}

function pjTableQuery(params){
    params["pageNum"] = (params.offset / params.limit) + 1;
    params.pageSize = params.limit;
    return params;

}